﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RegionalStatus.aspx.cs" Inherits="ValuationClient.项目勘察.RegionalStatus" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="../jquery-easyui-1.5.2/themes/default/easyui.css" rel="stylesheet" />
    <link href="../jquery-easyui-1.5.2/css/wu.css" rel="stylesheet" />
    <link href="../jquery-easyui-1.5.2/css/icon.css" rel="stylesheet" />
    <script src="../jquery-easyui-1.5.2/jquery.min.js"></script>
    <script src="../jquery-easyui-1.5.2/jquery.easyui.min.js"></script>
    <script src="../jquery-easyui-1.5.2/locale/easyui-lang-zh_CN.js"></script>
    <script src="../jquery-easyui-1.5.2/easyloader.js"></script>
        <script src="../jquery-easyui-1.5.2/jquery.params.js"></script>
</head>
<body>
    <div class="demo-info">
        <div class="demo-tip icon-tip"></div>
        <%--<div>Fill the form and submit it.</div>--%>
    </div>
    <div style="margin: 0;"></div>
    <form id="form1" runat="server">
        <div class="easyui-panel" fit="true" style="border: none;">
            <div style="margin-left: 30px;" id="ff">
                <table>
                    <tr>
                        <td>项目案名：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-textbox" id="xiang" type="text" style="width: 800px;" />
                        </td>
                    </tr>
                    <tr>
                        <td>来源：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-textbox" id="laiyuan" type="text" style="width: 800px;" readonly="true" value="证载" />
                        </td>
                    </tr>
                    <tr>
                        <td>小区封闭性：</td>
                        <td style="padding-left: 50px;">
                            <select class="easyui-combobox" style="width: 800px;" id="select2">
                      
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>居住小区楼宇结构：</td>
                        <td style="padding-left: 50px;">
                            <select class="easyui-combobox" style="width: 800px;" id="select3">
                      
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>交通组织方式：</td>
                        <td style="padding-left: 50px;">
                            <select class="easyui-combobox" style="width: 800px;" id="select4">
                        
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>景观及绿化：</td>
                        <td style="padding-left: 50px;">
                            <select class="easyui-combobox" style="width: 800px;" id="select5">
                  
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>容积率：</td>
                        <td style="padding-left: 50px;">
                            <select class="easyui-combobox" style="width: 800px;" id="select6">
                     
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>车位状况：</td>
                        <td style="padding-left: 50px;">
                            <select class="easyui-combobox" style="width: 800px;" id="select7">
                       
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>物业公司：</td>
                        <td style="padding-left: 50px;">
                            <select class="easyui-combobox" style="width: 800px;" id="select8">
                      
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>其他:</td>
                        <td style="padding-left: 50px;">
                            <textarea id="message" style="height: 60px; width: 800px;" placeholder="说点什么...最少输入10个字"></textarea>
                        </td>
                    </tr>
                </table>
            </div>
            <div style="text-align: center; padding: 5px">
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">提交</a>
            </div>
        </div>
    </form>

    <script type="text/javascript">
        //调用父页面的赋值方法    
        $(function () {
            var P_ReportNumber = $.query.get("id");//项目号
            //$("#xiangId").val(P_ReportNumber);
        })


        //小区封闭性
        select2();
        function select2() {
            $.ajax({
                type: "get",
                url: "http://localhost:55439/api/Dictionary?i=" + 11,
                success: function (obj) {
                    $('#select2').combobox({
                        data: obj,
                        valueField: 'Dictionary_Number',
                        textField: 'dictionary_Name'
                    })
                }
            })
        }



        //绑定居住小区楼宇结构
        select3();
        function select3() {
            $.ajax({
                type: "get",
                url: "http://localhost:55439/api/Dictionary?i=" + 12,
                success: function (obj) {
                    $('#select3').combobox({
                        data: obj,
                        valueField: 'Dictionary_Number',
                        textField: 'dictionary_Name'
                    })
                }
            })
        }



        //绑定交通组织方式
        select4();
        function select4() {
            $.ajax({
                type: "get",
                url: "http://localhost:55439/api/Dictionary?i=" + 13,
                success: function (obj) {
                    $('#select4').combobox({
                        data: obj,
                        valueField: 'Dictionary_Number',
                        textField: 'dictionary_Name'
                    })
                }
            })
        }




        //绑定景观及绿化
        select5();
        function select5() {
            $.ajax({
                type: "get",
                url: "http://localhost:55439/api/Dictionary?i=" + 14,
                success: function (obj) {
                    $('#select5').combobox({
                        data: obj,
                        valueField: 'Dictionary_Number',
                        textField: 'dictionary_Name'
                    })
                }
            })
        }



        //绑定容积率
        select6();
        function select6() {
            $.ajax({
                type: "get",
                url: "http://localhost:55439/api/Dictionary?i=" + 15,
                success: function (obj) {
                    $('#select6').combobox({
                        data: obj,
                        valueField: 'Dictionary_Number',
                        textField: 'dictionary_Name'
                    })
                }
            })
        }



        //绑定车位状况
        select7();
        function select7() {
            $.ajax({
                type: "get",
                url: "http://localhost:55439/api/Dictionary?i=" + 16,
                success: function (obj) {
                    $('#select7').combobox({
                        data: obj,
                        valueField: 'Dictionary_Number',
                        textField: 'dictionary_Name'
                    })
                }
            })
        }



        //绑定物业公司
        select8();
        function select8() {
            $.ajax({
                type: "get",
                url: "http://localhost:55439/api/Dictionary?i=" + 17,
                success: function (obj) {
                    $('#select8').combobox({
                        data: obj,
                        valueField: 'Dictionary_Number',
                        textField: 'dictionary_Name'
                    })
                }
            })
        }


        function submitForm()
        {
            var P_ReportNumber = $.query.get("id");//项目号
            var project = $("#xiang").val();
            var laiyuan = $("#laiyuan").val();
            var fengbi = $("#select2").combobox('getValue');
            var loustruct = $("#select3").combobox('getValue');
            var jiaotong = $("#select4").combobox('getValue');
            var jingguan = $("#select5").combobox('getValue');
            var rongji = $("#select6").combobox('getValue');
            var chewei = $("#select7").combobox('getValue');
            var wuye = $("#select8").combobox('getValue');
            var qita = $("#message").val();

            $.ajax({
                type: "post", //要用post方式                 
                url: "http://localhost:55439/api/prospecting/AddEAVillage",//方法所在页面和方法名
                data: {ProjectNumber:P_ReportNumber,
                    Village_CaseName: project, village_Cause: laiyuan, Village_Close: fengbi,
                    Village_Structure:loustruct, Village_Traffic:jiaotong,Village_Green: jingguan ,
                    Village_Volume:rongji ,Village_Parking:chewei,Village_Property: wuye ,
                    Village_Explain:qita
                },
                success: function (data) {             
                    if (data == true) {
                        $.messager.alert("提示信息", "保存成功");
                    }
                    else
                        $.messager.alert("提示信息", "保存失败");
                }
            });
        }

    </script>
</body>
</html>

